//
//  KUserCenterQRView.m
//  Keping
//
//  Created by Joanlove on 2017/12/20.
//  Copyright © 2017年 柯平. All rights reserved.
//

#import "KUserCenterQRView.h"
#import "KUserData.h"

@interface KUserCenterQRView()

@property (nonatomic, weak) IBOutlet UIView *qrBGView;
@property (nonatomic, weak) IBOutlet UIImageView *qrImg;
@property (nonatomic, weak) IBOutlet UILabel *qrName;
@property (nonatomic, weak) IBOutlet UILabel *qrPhone;

@end

@implementation KUserCenterQRView

// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
    [self setFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    
    self.qrBGView.layer.masksToBounds = YES;
    self.qrBGView.layer.cornerRadius = 10.0;
    
    KPartyView *partView = [KPartyView unarchive];
    [self.qrImg sd_setImageWithURL:[NSURL URLWithString:[KGetImageURL stringByAppendingString:partView.qrCode]] placeholderImage:[UIImage imageNamed:@"linkTime_icon"]];
    self.qrName.text = partView.realName;
    self.qrPhone.text = partView.phone;
}


@end
